package com.crea.cugasvr.wsinterface;

public class UServerInterfaceProxy implements com.crea.cugasvr.wsinterface.UServerInterface {
  private String _endpoint = null;
  private com.crea.cugasvr.wsinterface.UServerInterface uServerInterface = null;
  
  public UServerInterfaceProxy() {
    _initUServerInterfaceProxy();
  }
  
  public UServerInterfaceProxy(String endpoint) {
    _endpoint = endpoint;
    _initUServerInterfaceProxy();
  }
  
  private void _initUServerInterfaceProxy() {
    try {
      uServerInterface = (new com.crea.cugasvr.wsinterface.UServerInterfaceServiceLocator()).getuServerInterface();
      if (uServerInterface != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)uServerInterface)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)uServerInterface)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (uServerInterface != null)
      ((javax.xml.rpc.Stub)uServerInterface)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.crea.cugasvr.wsinterface.UServerInterface getUServerInterface() {
    if (uServerInterface == null)
      _initUServerInterfaceProxy();
    return uServerInterface;
  }
  
  public com.crea.cugasvr.wsinterface.USessionInfo wsCall(com.crea.cugasvr.wsinterface.USessionInfo sessionInfo) throws java.rmi.RemoteException{
    if (uServerInterface == null)
      _initUServerInterfaceProxy();
    return uServerInterface.wsCall(sessionInfo);
  }
  
  public java.lang.String wsSimpleCall(java.lang.String strRequest) throws java.rmi.RemoteException{
    if (uServerInterface == null)
      _initUServerInterfaceProxy();
    return uServerInterface.wsSimpleCall(strRequest);
  }
  
  
}